import { Effect } from "effect";

const unitRight = Effect.succeed(1);
const unitLeft = Effect.fail("error");
const booleanContext = Effect.context<boolean>();

// Effect.sync
// const syncEffect = Effect.sync(() => {
//   console.log("sync effect");
// });

// Effect.runSync(syncEffect);

// Effect.tryPromise
const tryPromiseEffect = Effect.tryPromise({
  try: async () => "tryPromise",
  catch: (error) => `Error: ${error}`,
});

Effect.runPromise(tryPromiseEffect).then(console.log);

// Effect.gen
// Effect.runPromise
// Effect.catchTag
// Effect.catchAll
// Effect.acquireRelease
// Effect.acquireUseRelease
// Effect.provide
// Effect.provideService
// Effect.andThen
// Effect.map
// Effect.tap
